<?php
session_start();

echo '<br><a href="index.php"><FONT color="#FF8888" size=4 > Accueil</FONT></a>';
echo '<br><hr>';



		include 'include/Data.php';
		$req = mysql_query('SELECT NumArticle, Titre FROM article');
		$ligne = mysql_fetch_assoc($req);
			while ($ligne)
			{
			echo '<p><a href="article.php?NumArticle='.$ligne['NumArticle'].'">'.$ligne['Titre'].'</a><p>';
			$ligne = mysql_fetch_assoc($req);
			}
		mysql_close($connexion);

	if (isset($_SESSION['login']) && isset($_SESSION['mdp'])) 
        {

        
	echo '<p>';
	echo '<hr>';
        echo '<b>Bienvenue '.$_SESSION['login'].' </b><br>';
            if ($_SESSION['Autorisation'] == 3)
                {
                    echo '<a href="admin/admin.php">Administration</a><br>';
                }
        echo '<a href="logout.php">Déconnection</a>';
        }
        else {
	echo '';
	echo '<hr>';
	echo '<form method="post" action="login.php" >';
        echo '<TABLE BORDER="0">';
	echo '<TR><TH>Utilisateur:</TH>';
	echo '<TH><input type="text" name="login" size="20" style="width:100;height:20;"></TH></TR>';
	echo '<TR><TH>Mot de passe:</TH>';
	echo '<TH><input type="password" name="mdp" value="" style="width:100;height:20;"></TH></TR>';
        echo '</TABLE>';
        echo '</br><center><input type="submit" value="Connexion"></center>';
	echo '</form>';
        }
?>
